package com.lantosec.hmrp.modules.category.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.category.vo.AssetsPrintLogVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * 资产标签打印日志 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AssetsPrintLog extends BaseEntity<AssetsPrintLogVO> {

    private static final long serialVersionUID = 1L;
    public AssetsPrintLog(AssetsPrintLogVO vo){
        this.logId = vo.getLogId();
        this.assetsId = vo.getAssetsId();
        this.printTime = vo.getPrintTime();
        this.printUserId = vo.getPrintUserId();
        this.printUser = vo.getPrintUser();
    }

    @Override
    public AssetsPrintLogVO convertToVO(){
        return new AssetsPrintLogVO(this);
    }


    /**
     * 打印日志ID
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    private Integer logId;

    /**
     * 资产ID
     */
    private String assetsId;

    /**
     * 打印时间
     */
    private Date printTime;

    /**
     * 打印人ID
     */
    private String printUserId;

    /**
     * 打印人
     */
    private String printUser;


    public enum ColName {
        log_id, assets_id, print_time, print_user_id, print_user, 
    }
}
